package io.renren.modules.store.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.store.dao.TStorePayMethodDao;
import io.renren.modules.store.entity.TStorePayMethodEntity;
import io.renren.modules.store.service.TStorePayMethodService;


@Service("tStorePayMethodService")
public class TStorePayMethodServiceImpl extends ServiceImpl<TStorePayMethodDao, TStorePayMethodEntity> implements TStorePayMethodService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<TStorePayMethodEntity> page = this.page(
                new Query<TStorePayMethodEntity>().getPage(params),
                new QueryWrapper<TStorePayMethodEntity>()
                        .eq(!params.get("sellerId").equals(""),"seller_id",params.get("sellerId"))
                .or()
                .eq("sys_built_in",1)
        );
        return new PageUtils(page);
    }

}